#!/bin/bash
set -e
set -x
MYDIR="${0%/*}"
cd "$MYDIR/.."
source "recipes/common.sh"


# RECIPE START pkg-config-alt

reset_mtime pkg-config-alt pkg-config-alt/configure.ac
rm -rf build/pkg-config-alt
mkdir -p build/pkg-config-alt
cd build/pkg-config-alt
cat > config.cache <<-EOF
ac_cv_func_posix_getgrgid_r=yes
ac_cv_func_posix_getpwuid_r=yes
glib_cv_compliant_posix_memalign=yes
glib_cv_have_strlcpy=no
glib_cv_rtldglobal_broken=no
glib_cv_stack_grows=yes
glib_cv_va_val_copy=no
glib_cv_uscore=no
EOF
../../pkg-config-alt/configure \
	${CONFIGURE_ARGS} \
	--cache-file=config.cache \
	--with-internal-glib \
	--with-pc-path="${prefix}/${target_libdir}/pkgconfig"

cd ../..
make_build build/pkg-config-alt

# RECIPE END pkg-config-alt
